package com.pro.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
@RequestMapping("/choose")
public class ChooseController {
	/**
	 * 选择signType=sg
	 */
	@RequestMapping(value = "/single", method = RequestMethod.GET)
	public String toSg(Model model, HttpSession session, HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		session.setAttribute("signType", "S");
		return "bd";
	}
	/**
	 * 选择signType=fa
	 */
	@RequestMapping(value = "/family", method = RequestMethod.GET)
	public String toFa(Model model, HttpSession session, HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		session.setAttribute("signType", "F");
		return "bd";
	}
	/**
	 * 选择signType=gr
	 */
	@RequestMapping(value = "/group", method = RequestMethod.GET)
	public String toGr(Model model, HttpSession session, HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		session.setAttribute("signType", "G");
		return "bd";
	}
	/**
	 * 选择signType=gr
	 */
	@RequestMapping(value = "/add", method = RequestMethod.GET)
	public String add(Model model, HttpSession session, HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		return "bd";
	}
}
